﻿using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using Zo.ExcelBox.Models;
using Zo.ExcelBox.ViewModels;

namespace Zo.ExcelBox.Pages
{
    /// <summary>
    /// DataTransformFolderSetWin.xaml 的交互逻辑
    /// </summary>
    public partial class DataTransformFolderSetWin : Window
    {
        /// <summary>
        /// 成功
        /// </summary>
        public event Action<ObservableCollection<DataTransformFolder>> OnSucceed;

        public DataTransformFolderSetWin(ObservableCollection<DataTransformFolder> datas=null)
        {
            InitializeComponent();

            var vm = new DataTransformFolderSetWinVM(datas);
            vm.OnSucceed += (data) =>
            {
                OnSucceed?.Invoke(data);
                this.Close();
            };

            this.DataContext = vm;
        }
    }



}
